
#include <talos/Arduino>
#include <iostream>
#include <stdio.h>

int main()
{
	talos::ArduinoFirmata arduino( "/dev/ttyACM0", 9600 );

	sleep(2);

	while ( true )
	{
		//sleep(1);
		//arduino.setAnalog( 0, ANALOG_READ );
		//arduino.queryFirmware();

		arduino.setAnalog( 0, ANALOG_READ_CONTINUOUSLY );
		sleep(2);
		arduino.setAnalog( 0, ANALOG_STOP_READING );
		arduino.setAnalog( 1, ANALOG_READ_CONTINUOUSLY );
		sleep(2);
		arduino.setAnalog( 1, ANALOG_STOP_READING );
		sleep(2);
	}
}

